import request from '@/utils/request'

/**
 *  历史视频-获取设备通道树
 *  pmy
 * @export
 * @return
 */
export async function getHisVideoTree(data) {
    let url = "/basicCompanyInformation/hisDeviceTree";
    return request({
        url: url,
        method: "get",
        data: data
    })
}

/**
 *  历史视频-获取视频列表（服务器视频）
 *  pmy
 * @export
 * @param 
 * @return
 */
export async function getHisVideoTable(data) {
    let url = "/comlbs/realtimeVideo/serverHistoryVideo/list";
    // let url = "/comlbs/historyVideo/serverList";
    return request({
        url: url,
        method: 'post',
        data: data
    });
};

/**
 *  历史视频-获取视频列表(设备视频)
 *  pmy
 * @export
 * @param
 * @return
 */
export async function getDvoHisVideo(data) {
    let url = "/comlbs/realtimeVideo/deviceHistoryVideo/list";
    // let url = "/comlbs/historyVideo/deviceList";
    return request({
        url: url,
        method: 'post',
        data: data
    });
};

/**
 *  历史视频-获取设备视频url
 *  pmy
 * @export
 * @param channel(可选,其他为必填)
 * @return
 */
export async function getDvoVideoUrl(data) {
    let url = "/comlbs/historyVideo/getVideoInfo";
    return request({
        url: url,
        method: 'get',
        params: data
    });
};

/**
 *  历史视频-获取设备视频(开启视频)
 *  pmy
 * @export
 * @param channel(可选,其他为必填)
 * @return
 */
export async function openDvoVideoUrl(data) {
    let url = "/comlbs/historyVideo/openDeviceVideo";
    return request({
        url: url,
        method: 'post',
        data: data
    });
};

/**
 *  历史视频-获取设备视频（关闭视频）
 *  pmy
 * @export
 * @param channel(可选,其他为必填)
 * @return
 */
export async function closeDvoVideoUrl(data) {
    let url = "/comlbs/historyVideo/closeDeviceVideo";
    return request({
        url: url,
        method: 'post',
        data: data
    });
};
